﻿<?xml version="1.0" encoding="utf-8" ?>
<log4net>
  <!-- A1 is set to be a ConsoleAppender -->
  <appender name="A1" type="log4net.Appender.ColoredConsoleAppender">
    <mapping>
      <level value="ERROR" />
      <foreColor value="White" />
      <backColor value="Red, HighIntensity" />
    </mapping>
    <mapping>
      <level value="DEBUG" />
      <backColor value="Green" />
    </mapping>
    <layout type="log4net.Layout.PatternLayout">
      <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
    </layout>
  </appender>
  
  <!-- Set root logger level to DEBUG and its only appender to A1 -->
  <root>
    <level value="INFO" />
    <appender-ref ref="A1" />
  </root>
</log4net>